package com.android.v1.ordertracking.utils;

import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
 
public class SharedPreferenceUtils {
	/*
	 * name  is SharedPreferences name
	 */
	public static String getString(Context ctx, String name, String key) {
		SharedPreferences share = ctx.getSharedPreferences(name, Activity.MODE_PRIVATE);
		return share.getString(key, null);
	}
	
	public static void putString(Context ctx, String name, String key, String value) {
		SharedPreferences share = ctx.getSharedPreferences(name, Activity.MODE_APPEND);
		Editor edit = share.edit();
		edit.putString(key, value);
		edit.commit();
	}
	
}
